<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div class="zoom-element zoom-element--double">
        <input type="range" min="0" max="100" value="0" id="colorRange">
        <img src="https://css.brilliantearth.com/static/img/handskin/female_hand_visualizer_zo_light_updated.jpg" class="light_base_hand img-responsive" style="position: absolute;">
        <img src="https://css.brilliantearth.com/static/img/handskin/female_hand_visualizer_zo_dark_updated.jpg" class="dark_base_hand img-responsive" style="opacity: 0;position: absolute;">
        <img src="https://css.brilliantearth.com/static/img/handskin/female_hand_visualizer_zo_dark2_updated.jpg" class="dark_base2_hand img-responsive" style="opacity: 0;position: absolute;">
    </div>
    
    <script>
        const colorRange = document.getElementById('colorRange');
        const lightHand = document.querySelector('.light_base_hand');
        const darkHand = document.querySelector('.dark_base_hand');
        const dark2Hand = document.querySelector('.dark_base2_hand');
    
        colorRange.addEventListener('input', function() {
            const value = parseInt(this.value) / 100; // 将值映射到 0 到 1 之间
            // 根据值计算手的透明度
            lightHand.style.opacity = 1 - value*2;
            darkHand.style.opacity = value<0.5?value*2:2-value*2;
            dark2Hand.style.opacity = value * 2-0.5;
        });
    </script>
</body>
</html>